package com.forum.module.blog.dal.mysql.notification;

import com.forum.framework.common.pojo.PageResult;
import com.forum.framework.mybatis.core.mapper.BaseMapperX;
import com.forum.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.forum.module.blog.controller.notification.vo.NotificationPageReqVO;
import com.forum.module.blog.dal.dataobject.notification.NotificationDO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface NotificationMapper extends BaseMapperX<NotificationDO> {
    default PageResult<NotificationDO> selectPage(NotificationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<NotificationDO>()
                .eqIfPresent(NotificationDO::getUserId, reqVO.getUserId()));
    }
}
